function searchFunction(){
	var valueHid=$('#searchHid').val();
	if(valueHid==0){
		$('#search').show();
		$('#searchHid').val(1);
		$('#wrapper').css('top','40%');
	}else{
		$('#search').hide();
		$('#searchHid').val(0);
	}
	
}
function searchInputFiledsFun(){
	var flag=true;
	var search=$('#searchInputFields').val();
	if(search==""){
		$('#searchError').html('Search Required');
		flag=false;
	}else{
		$('#searchError').html('');
	}
	if(flag==true){
	$('#notificationLoader').html('<img src="images/ajax-loader.gif"/>');
		$.ajax({
			type		:	'GET',
			url			:  	webServiceUrl+'country/'+search+'-'+'0',
			dataType	: 	"json",
			success: function(data){
			if(data.value==1){
				$('#notificationLoader').html('');
				$('#today_posts').hide();
				var html="";
				html+='<center><table border=1px;>';
				html+='<thead><tr><th>Flag</th><th>Country Name</th><th>Capital</th><th>Currency</th><th>OfficialLanguage</th></tr></thead>';
				html+='<tbody>';
				var obj = eval("(" + data.countryDetails + ")");
				$.each(obj, function (index,Object) {
					html+='<tr>';
					html+='<td><img src="flags/'+Object.country_flag+'"/></td>';	
					html+='<td>'+Object.country_name+'</td>';
                    html+='<td>'+Object.country_capital+'</td>';						
                    html+='<td>'+Object.country_currency+'</td>';						
                    html+='<td>'+Object.country_official_language+'</td>';						
					html+='</tr>';
				});
				html+='</tbody>';
				html+='</table></center>';
				$('#searchHideandShow').html('<center><a href="index.html">Home</a></center>');
				$('#searchCountryDiv').html(html);
			}else{
				$('#notificationLoader').html('');
				alert('NO DATABASE FOUND');
			}
			}
				
		});
	}
}
//serchPDetailes popup_text
function serchPDetailes(userpostId){
	$('#serchpatid'+userpostId).popUpWindow({action: "open"});
}
function serchaletspartDet(userpostreplyId){
	$('#spatid'+userpostreplyId).popUpWindow({action: "open"});
}
